Include "Widgets.bmx"

Include "Modules/Mapeditor_Module.bmx"

Type Tab_Module

	Field Index : Int
	Field Panel : TGadget
	Field Title : String
	Field IsActive : Byte

	Field Tab_Gadgets : Widget[]

	Method New()
	
	End Method
	
	Method AddModule(Parent : TGadget, show : Byte = False)
	
		Local	ppanel:TGadget
		
		ppanel=CreatePanel(0,0,ClientWidth(Parent),ClientHeight(Parent),Parent,PANEL_GROUP)
		
		SetGadgetLayout ppanel,1,1,1,1
		If show = True Then
			ShowGadget ppanel
		Else
			HideGadget ppanel
		EndIf
		Panel = ppanel
	
	End Method
	
	
	Method Set()
	
		
	
	
	End Method
	
	Method Update(EID:Int,Obj:Object,EEX:Object = Null)
	
		For Local i : Int = 0 To Tab_Gadgets.length-1
		
			If Tab_Gadgets[i] <> Null
			
				Tab_Gadgets[i].Update(EID,Obj)
			
			EndIf
		
		Next
	
	End Method


End Type